<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
    <div class="mc">
        <div>
            <div class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </div>
            <div class="mc-m">
                <div class="navToggle"></div>
            </div>
            <div class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="交易订单管理">
                        <#include "banner.html">
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
								<div class="s_toolTop">
									<div class="toolbor-module export">
										<input type="button" onclick="exportxls()" value="导出列表" class="input-button export-btn"/>
									</div>
								</div>
								<div class="s_toolTop">
									<div class="toolbor-module export">
										<div class="formTit">添加时间：</div>
										<input class="_search-value" name="addStartDate" id="addStartDate" value="" onclick="change_picktime()"/>
										<div class="formTit"> 到 </div>
										<input class="_search-value" name="addEndDate" id="addEndDate" value=""  onclick="change_picktime()"/>
									</div>
									<div class="toolbor-module export">
										<div class="formTit">商品名称：</div>
										<input type="text" name="goodsName" id="goodsName" value="请输入商品名称" class="search-value">
									</div>
									<div class="toolbor-module export">
										<div class="formTit">手机号：</div>
										<input type="text" name="phone" id="phone" value="请输入手机号" class="search-value">
									</div>
									<div class="toolbor-module export">
										<div class="formTit">订单号：</div>
										<input type="text" name="orderNo" id="orderNo" value="请输入订单号" class="search-value">
									</div>
									<div class="toolbor-module export">
										<div class="formTit">用户名：</div>
										<input type="text" name="userName" id="userName" value="请输入用户名" class="search-value">
									</div>

								</div>
								<div class="s_toolTop">
									<div class="toolbor-module export">
										<div class="formTit">交易类型：</div>
										<div class="select-box" id="tradeType">
											<div class="tag-select">全部</div>
											<ul class="tag-options">
												<li data-value="">全  部</li>
												<li data-value="101">PC申购</li>
												<li data-value="103">WAP申购</li>
												<li data-value="106">IOS申购</li>
												<li data-value="107">And申购</li>
												<li data-value="104">资产管理公司充值</li>
												<li data-value="108">准备金充值</li>
												<li data-value="105">一分钱银行卡校验</li>
												<li data-value="111">认证自动还款</li>
												<li data-value="112">资产管理公司提现</li>
												<li data-value="114">准备金提现</li>
												<li data-value="999">其他</li>
											</ul>
										</div>
									</div>
									<div class="toolbor-module export">
										<div class="formTit">订单状态：</div>
										<div class="select-box" id="status">
											<div class="tag-select">全部</div>
											<ul class="tag-options">
												<li data-value="">全  部</li>
												<li data-value="101">本地发起申请</li>
												<li data-value="103">本地订单过期</li>
												<li data-value="105">查无退出的银行卡</li>
												<li data-value="206">请求支付失败</li>
												<li data-value="200">支付成功</li>
												<li data-value="201">支付处理中</li>
												<li data-value="298">用户取消</li>
												<li data-value="299">支付失败</li>
												<li data-value="204">支付退款</li>
												<li data-value="203">支付订单超时</li>
											</ul>
										</div>
									</div>
									<div class="toolbor-module export">
										<div class="formTit">付款类型：</div>
										<div class="select-box" id="payType">
											<div class="tag-select">全部</div>
											<ul class="tag-options">
												<li data-value="">全  部</li>
												<li data-value="0">默认</li>
												<li data-value="1">收入</li>
												<li data-value="2">支出</li>
											</ul>
										</div>
									</div>

									<div class="toolbor-module search">
										<input type="button" value="搜索"  class="input-button" onclick="sousuo();">
									</div>

								</div>
                            </div>
                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                <form action="" method="post">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>序号</td>
                                            <td>用户名</td>
                                            <td>真实姓名</td>
                                            <td>订单号</td>
                                            <td>交易渠道</td>
                                            <td>交易类型</td>
                                            <td>付款类型</td>
                                            <td>添加时间</td>
                                            <td>订单失效时间</td>
                                            <td>支付响应时间</td>
                                            <td>关联业务主键</td>
                                            <td>交易金额</td>
                                            <td>商品名称</td>
                                            <td>订单信息</td>
                                            <td>订单状态</td>
                                            <td>IP</td>
                                        </tr>
                                        <#if list?? && (list?size > 0)> 
                                        	<#list list as obj>
                                            <tr class="s">
                                                <td>${obj.orderId?c}</td>
	                                            <td>${obj.user.userName!''}</td>
	                                            <td>${obj.user.realName!''}</td>
	                                            <td>${obj.orderNo!''}</td>
	                                            <td>
	                                            <#if obj.tradeChannel==1>连连支付<#else>-</#if>
	                                            </td>
	                                            <td>
	                                            <#if obj.tradeType == 101>
	                                            	PC申购
	                                            <#elseif obj.tradeType == 102>
	                                            	APP申购
	                                            <#elseif obj.tradeType == 103>
	                                            	WAP申购
	                                            <#elseif obj.tradeType == 104>
	                                            	充值
	                                            <#elseif obj.tradeType == 105>
	                                            	一分钱银行卡校验
                                            	<#elseif obj.tradeType == 106>
                                            	IOS充值
                                            	<#elseif obj.tradeType == 107>
                                            	A您的充值
	                                            <#elseif obj.tradeType == 111>
	                                            	自动还款
	                                            <#elseif obj.tradeType == 112>
	                                            	借款提现
	                                            <#elseif obj.tradeType == 113>
	                                            	奖励提现
	                                            <#elseif obj.tradeType == 114>
	                                            	准备金提现
	                                            <#elseif obj.tradeType == 201>
	                                            	借款入账
	                                            <#elseif obj.tradeType == 202>
	                                            	借款支出
	                                            <#elseif obj.tradeType == 203>
	                                            	借款手续费入账
	                                            <#elseif obj.tradeType == 204>
	                                            	借款手续费支出
	                                            <#elseif obj.tradeType == 205>
	                                            	技术服务费入账
	                                            <#elseif obj.tradeType == 206>
	                                            	技术服务费支出
	                                            <#elseif obj.tradeType == 207>
	                                            	红包使用支出
	                                            <#elseif obj.tradeType == 999>
	                                            	其他
	                                            <#else>
	                                           		其他
	                                            </#if>
	                                            </td>
	                                            <td>
	                                            	<#if obj.payType == 1>
	                                            		收入
	                                            	<#elseif obj.payType ==2>
	                                            		支出
	                                            	<#else>
	                                            		默认
	                                            	</#if>
	                                            </td>
	                                            <td>${obj.addTime!''}</td>
	                                            <td>${obj.expiryTime!''}</td>
	                                            <td>${obj.payResultTime!''}</td>
	                                            <td>${obj.busId?c}</td>
	                                            <td>${obj.tradeMoney?c}</td>
	                                            <td>${obj.goodsName!''}</td>
	                                            <td>${obj.orderInfo!''}</td>
	                                            <td>
	                                            	<#if obj.status==101>
	                                            		本地发起申请
	                                            	<#elseif obj.status==103>
	                                            		本地订单过期
	                                            	<#elseif obj.status==105>
	                                            		查无退出的银行卡
	                                            	<#elseif obj.status==206>
	                                            		请求支付失败
	                                            	<#elseif obj.status==200>
	                                            		支付成功
	                                            	<#elseif obj.status==201>
	                                            		支付处理中
	                                            	<#elseif obj.status==299>
	                                            		支付失败
                                            		<#elseif obj.status==298>
                                            			用户取消
	                                            	<#elseif obj.status==204>
	                                            		支付退款
	                                            	<#elseif obj.status==203>
	                                            		支付订单超时
	                                            	<#else>
	                                            		-
	                                            	</#if>
	                                            </td>
	                                            <td>${obj.addIp!''}</td>
                                            </tr>
                                       	 	</#list> 
                                        </#if>
                                    </table>
                                </form>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>

                                    <!--翻页系统--{-->
                                    <div class="container s_formPage">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="${pageUrl}" map=param style="style1" />
                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->

                                <script type="text/javascript">
                                    var url='tradeOrder.html?search=true';
                                    function sousuo(){
                    					var sou = "";
                    					var userName = $("#userName").val();
                    					if (userName!=""&&userName!="请输入用户名"){
                    						sou += "&userName="+userName;
                    					}
                    					var orderNo = $("#orderNo").val();
                    					if (orderNo!=""&&orderNo!="请输入订单号"){
                    						sou += "&orderNo="+orderNo;
                    					}
                    					var goodsName = $("#goodsName").val();
                    					if(goodsName!=""&&goodsName!="请输入商品名称"){
                    						sou += "&goodsName="+goodsName;
                    					}
                    					
                    					var phone = $("#phone").val();
                    					if(phone!=""&&phone!="请输入手机号"){
                    						sou += "&phone="+phone;
                    					}
                    					
                   					    var addStartDate = $("#addStartDate").val();
                                       	var addEndDate = $("#addEndDate").val();
                                        if (addStartDate!=null){
                                            sou += "&addStartDate="+addStartDate;
                                        }
                                        if (addEndDate!=null){
                                            sou += "&addEndDate="+addEndDate;
                                        }
                                        var tradeType = $("#tradeType").find(".open-selected").attr("data-value");
                                        if(tradeType!=null&&tradeType!=""&&tradeType!="undefine"){
                                        	sou += "&tradeType="+tradeType;
                                        }
                                        var status = $("#status").find(".open-selected").attr("data-value");
                                        if(status!=null&&status!=""&&status!="undefine"){
                                        	sou += "&status="+status;
                                        }
                                        var payType = $("#payType").find(".open-selected").attr("data-value");
                                        if(payType!=null&&payType!=""&&payType!="undefine"){
                                        	sou += "&payType="+payType;
                                        }
                    					if (sou!=""){
                    							location.href=url+sou;
                    						}
                    					}
                                    
                                    
                                    var xlsurl='tradeOrder.html?type=export';
                                    function exportxls(){
                                    	var sou = "";
                    					var userName = $("#userName").val();
                    					if (userName!=""&&userName!="请输入用户名"){
                    						sou += "&userName="+userName;
                    					}
                    					var orderNo = $("#orderNo").val();
                    					if (orderNo!=""&&orderNo!="请输入订单号"){
                    						sou += "&orderNo="+orderNo;
                    					}
                    					var goodsName = $("#goodsName").val();
                    					if(goodsName!=""&&goodsName!="请输入商品名称"){
                    						sou += "&goodsName="+goodsName;
                    					}
                    					
                    					var phone = $("#phone").val();
                    					if(phone!=""&&phone!="请输入手机号"){
                    						sou += "&phone="+phone;
                    					}
                    					
                   					    var addStartDate = $("#addStartDate").val();
                                       	var addEndDate = $("#addEndDate").val();
                                        if (addStartDate!=null){
                                            sou += "&addStartDate="+addStartDate;
                                        }
                                        if (addEndDate!=null){
                                            sou += "&addEndDate="+addEndDate;
                                        }
                                        var tradeType = $("#tradeType").find(".open-selected").attr("data-value");
                                        if(tradeType!=null&&tradeType!=""&&tradeType!="undefine"){
                                        	sou += "&tradeType="+tradeType;
                                        }
                                        var status = $("#status").find(".open-selected").attr("data-value");
                                        if(status!=null&&status!=""&&status!="undefine"){
                                        	sou += "&status="+status;
                                        }
                                        var payType = $("#payType").find(".open-selected").attr("data-value");
                                        if(payType!=null&&payType!=""&&payType!="undefine"){
                                        	sou += "&payType="+payType;
                                        }
                                  
                                           if (sou!=""){
                                               location.href=xlsurl+sou;
                                           } else{
                                               location.href=xlsurl;
                                           }
                                      }
                                   
                              
                                </script>
                            </div>

            </div>
        </div>
        <div>
            <!--尾部--{-->
            <td colspan="3" class="mc-b"><#include "../foot.html"></td>
            <!--尾部--}-->
        </div>
    </div>

    </body>
</html>
<#include "../jsPage.html">
